#!/bin/bash

# rsync HP-Notebook/os/*  to VM-OS
# sudo apt install openssh-server
# Ubuntu14.04-i386-Xv6i-clone
# 将安装资源和源码拷贝到运行环境(虚拟机) 并为源码在桌面创建链接
# IP=192.168.0.101
IP=172.16.11.213
rsync -a ~/Projs/MIT_6.828_2018_Labs           lwh@${IP}:/home/lwh/
rsync -a ~/Projs/MIT_Xv6_2018_Resources_Notes  lwh@${IP}:/home/lwh/
rsync -a ~/Projs/Linux0.11_LiZhiJun            lwh@${IP}:/home/lwh/
ssh lwh@${IP}  > /dev/null 2>&1  << EOF
    su - root 
    rm -rf ~/Desktop/jos
    ln -s ~/MIT_6.828_2018_Labs                                 ~/Desktop/jos
    rm -rf ~/Desktop/xv6-11
    ln -s ~/MIT_Xv6_2018_Resources_Notes/resources/xv6-rev11    ~/Desktop/xv6-11
    rm -rf ~/Desktop/oslab
    ln -s ~/Linux0.11_LiZhiJun/03_Lab/oslab                     ~/Desktop/oslab
    exit
EOF





